import { defineStore } from "pinia"

export const useProfileState = defineStore("profile", {
  state: () => ({
    iconList:[
      {
        id: 1,
        icon: 'icon-user',
        name: "个人信息",
        path: 'profile_my'
      },
      {
        id: 2,
        icon: 'icon-walet',
        name: '我的订单',
        path: 'profile_order'
      },
      {
        id: 3,
        icon: 'icon-heart',
        name: '我的喜欢',
        path: 'profile_love'
      },
      {
        id: 6,
        icon: 'icon-3701mima',
        name: '账号与密码',
        path: 'profile_password'
      },
      {
        id: 4,
        icon: 'icon-bell',
        name: '消息通知',
        path: 'profile_notify'
      },
      {
        id: 5,
        icon: 'icon-setting',
        name: '设置',
        path: 'profile_setting'
      },
    ],
    selectIconId: 1
  }),
  actions: {
    setSelectIconId(id: number) {
      this.selectIconId = id
    }
  }
})